import pytest,requests
from conftest import *


class TestCase():
    def test_01(self,add_shop):
        url='http://10.59.9.32/jeewms/mdCusController.do?doAdd'
        headers1={'content-type': 'application/json',
                  "Cookie": "JSESSIONID=6207582C5E1E5723959ABE2BCB101B55"}
        data=add_shop
        try:
            jieguo = requests.post(url=url, headers=headers1, data=data)
            print(jieguo.json())
        except Exception as e:
            print(e)




        assert 200==jieguo.status_code

        assert '客户添加成功' == jieguo.json()['msg']
    def test_02(self,add_ku):
        url='http://10.59.9.32/jeewms/rfidBuseController.do?doAdd'
        headers1={'content-type': 'application/json',
                  "Cookie": "JSESSIONID=6207582C5E1E5723959ABE2BCB101B55"}
        data=add_ku
        jieguo=requests.post(url=url,headers=headers1,data=data)

        print(jieguo.json())

        assert 200==jieguo.status_code

        assert 'RFID表添加成功' == jieguo.json()['msg']